package com.atguigu.gmall.product.service.impl;


import com.atguigu.gmall.model.product.SpuImage;
import com.atguigu.gmall.product.mapper.SpuImageMapper;
import com.atguigu.gmall.product.service.SpuImageService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author h8467
 * @description 针对表【spu_image(商品图片表)】的数据库操作Service实现
 * @createDate 2022-11-01 14:01:54
 */
@Service
public class SpuImageServiceImpl extends ServiceImpl<SpuImageMapper, SpuImage>
        implements SpuImageService {

    @Override
    public List<SpuImage> getListBySpuId (Long spuId) {
        QueryWrapper<SpuImage> qw = new QueryWrapper<> ();
        qw.eq ("spu_id", spuId);
        return this.list (qw);
    }
}




